//
//  Shop.m
//  Sydeny
//
//  Created by Rainbow on 7/23/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Shop.h"


@implementation Shop
@synthesize shopId;
@synthesize title;
@synthesize name;
@synthesize address;
@synthesize telephone;
@synthesize description;
@synthesize details;
@synthesize createTime;
@synthesize email;
@synthesize latitude;
@synthesize longtitude;
@synthesize images;

-(id)init
{
    self = [super init];
    if (self) {
        images = [[NSMutableArray alloc] initWithCapacity:0];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
	[aCoder encodeObject:self.shopId forKey:@"shopId"];
	[aCoder encodeObject:self.title forKey:@"title"];
	[aCoder encodeObject:self.name forKey:@"name"];
	[aCoder encodeObject:self.address forKey:@"address"];
	[aCoder encodeObject:self.telephone forKey:@"telephone"];
	[aCoder encodeObject:self.description forKey:@"description"];
	[aCoder encodeObject:self.details forKey:@"details"];
	[aCoder encodeObject:self.createTime forKey:@"createTime"];
	[aCoder encodeObject:self.email forKey:@"email"];
	[aCoder encodeObject:self.latitude forKey:@"latitude"];
	[aCoder encodeObject:self.longtitude forKey:@"longtitude"];
	[aCoder encodeObject:self.images forKey:@"images"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
	if ([self init]) {
		self.shopId = [aDecoder decodeObjectForKey:@"shopId"];
		self.title = [aDecoder decodeObjectForKey:@"title"];
		self.name = [aDecoder decodeObjectForKey:@"name"];
		self.address = [aDecoder decodeObjectForKey:@"address"];
		self.telephone = [aDecoder decodeObjectForKey:@"telephone"];
		self.description = [aDecoder decodeObjectForKey:@"description"];
		self.details = [aDecoder decodeObjectForKey:@"details"];
		self.createTime = [aDecoder decodeObjectForKey:@"createTime"];
		self.email = [aDecoder decodeObjectForKey:@"email"];
		self.latitude = [aDecoder decodeObjectForKey:@"latitude"];
		self.longtitude = [aDecoder decodeObjectForKey:@"longtitude"];
		self.images = [aDecoder decodeObjectForKey:@"images"];
    }
	return self;
}

-(void)dealloc
{
    [shopId release];
    [title release];
    [name release];
    [address release];
    [telephone release];
    [description release];
    [details release];
    [createTime release];
    [email release];
    [latitude release];
    [longtitude release];
    [images release];
    [super dealloc];
}

@end
